<header class="page-header_wrapper">
    <!--
    <section class="flash justify-content-center align-items-center">
        <div class="alert alert-info alert-dismissible fade show w-100 text-center" role="alert">
            Just announced! <u><a href="http://aka.ms/dnfmemberupdate">.NET Foundation Open Membership!</a></u>
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>
    </section>
    -->

    <!--
    <section class="flash justify-content-center align-items-center">
        <div class="alert alert-info alert-dismissible fade show w-100 text-center" role="alert">
            <a href="/blog/2019/03/28/net-foundation-board-of-directors-election-results">.NET Foundation Election Results: <u>Meet the 2019 Board of Directors!</u></a>
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>
    </section>
    -->

  <!--
    <section class="flash justify-content-center align-items-center" style="background-color: #000000;font-weight:bold">
        <div class="alert show w-100 text-center" role="alert">
            Black Lives Matter. <u><a style="color:#bb9d86" target="_blank" rel="noreferrer" href="https://support.eji.org/give/153413/#!/donation/checkout">Support the Equal Justice Initiative.</a></u>
        </div>
    </section>
  -->

    <section class="flash justify-content-center align-items-center" style="background-color: #005BBB;font-weight:bold">
        <div class="alert show w-100 text-center" role="alert">
            We Stand with Ukraine <u><a style="color:#FFD500" target="_blank" rel="noreferrer" href="https://novaukraine.org/donate/">Support Nova Ukraine</a></u>
        </div>
    </section>

    <section class="flash justify-content-center align-items-center" style="background-color: ##68217a;font-weight:bold">
        <div class="alert show w-100 text-center" role="alert">
            This is the old version of the .NET Foundation Website, please visit the <u><a href="https://dotnetfoundation.org">new site</a></u>
        </div>
    </section>

    <div class="site-nav_container container">
        <nav class="navbar navbar-expand-md align-items-end">
            <a class="navbar-brand" href="/"><img id="site-logo" src="/img/dotNetFoundationHorizontal.svg" alt=".NET Foundation"></a>
            <button class="main-menu_toggle navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarSupportedContent">
              <ul id="main-menu" class="navbar-nav ml-auto">
                <li class="nav-item dropdown main-menu_item">
                  <a class="nav-link dropdown-toggle-custom" id="membership-dropdown membership-dropdown--mobile" href="/member" role="button" aria-haspopup="true" aria-expanded="false">
                    Membership
                  </a>
                  <div class="dropdown-menu" aria-labelledby="membership-dropdown">
                    <a class="dropdown-item" href="/member/corporate-sponsors">Corporate Sponsors</a>
                    <a class="dropdown-item" href="/member/corporate-membership">Corporate Membership</a>
                    <a class="dropdown-item" href="/member/profile" data-no-validate>Profile</a>
                    <a class="dropdown-item" href="/member/become-a-member">Become A Member</a>
                  </div>
                  <div class="mobile-items" aria-labelledby="membership-dropdown--mobile">
                    <a class="dropdown-item" href="/member">Membership</a>
                    <a class="dropdown-item" href="/member/corporate-sponsors">Corporate Sponsors</a>
                    <a class="dropdown-item" href="/member/corporate-membership">Corporate Membership</a>
                    <a class="dropdown-item" href="/member/profile" data-no-validate>Profile</a>
                    <a class="dropdown-item" href="/member/become-a-member">Become A Member</a>
                  </div>
                </li>
                <li class="nav-item dropdown main-menu_item">
                  <a class="nav-link dropdown-toggle-custom" id="projects-dropdown projects-dropdown--mobile" href="/projects" role="button" aria-haspopup="true" aria-expanded="false">
                    Projects
                  </a>
                  <div class="dropdown-menu projects-menu" aria-labelledby="projects-dropdown">
                    <a class="dropdown-item" href="/projects/why-join">Benefits</a>
                    <a class="dropdown-item" href="/projects/submit">Submit A Project</a>
                    <a class="dropdown-item" href="/projects/spotlight">Project Spotlight</a>
                    <a class="dropdown-item" href="/projects/archived-projects">Archived Projects</a>
                  </div>
                  <div class="mobile-items" aria-labelledby="projects-dropdown--mobile">
                    <a class="dropdown-item" href="/projects">Projects</a>
                    <a class="dropdown-item" href="/projects/why-join">Benefits</a>
                    <a class="dropdown-item" href="/projects/submit">Submit A Project</a>
                    <a class="dropdown-item" href="/projects/spotlight">Project Spotlight</a>
                  </div>
                </li>
                <li class="nav-item dropdown main-menu_item">
                  <a class="nav-link dropdown-toggle-custom" id="community-dropdown community-dropdown--mobile" href="/community" role="button" aria-haspopup="true" aria-expanded="false">
                    Community
                  </a>
                  <div class="dropdown-menu" aria-labelledby="community-dropdown">
                    <a class="dropdown-item" href="/community/committees">Committees</a>
                    <a class="dropdown-item" href="/community/meetups">.NET Meetups</a>
                    <a class="dropdown-item" href="/community/speakers">Speakers</a>
                    <a class="dropdown-item" href="/community/get-involved">Get Involved</a>
                    <a class="dropdown-item" href="/community/resources">Resources</a>
                  </div>
                  <div class="mobile-items" aria-labelledby="community-dropdown--mobile">
                      <a class="dropdown-item" href="/community">Community</a>
                      <a class="dropdown-item" href="/community/committees">Committees</a>
                      <a class="dropdown-item" href="/community/meetups">.NET Meetups</a>
                      <a class="dropdown-item" href="/community/speakers">Speakers</a>
                      <a class="dropdown-item" href="/community/get-involved">Get Involved</a>
                      <a class="dropdown-item" href="/community/resources">Resources</a>
                  </div>
                </li>
                <li class="nav-item dropdown main-menu_item">
                  <a class="nav-link dropdown-toggle-custom" id="education-dropdown education-dropdown--mobile" href="/education" role="button" aria-haspopup="true" aria-expanded="false">
                    Education
                  </a>
                  <div class="dropdown-menu" aria-labelledby="education-dropdown">
                    <a class="dropdown-item" href="https://github.com/dotnet-foundation/wg-education">Education Committee</a>
                    <a class="dropdown-item" href="/education/academy">.NET Foundation Academy</a>

                  </div>
                  <div class="mobile-items" aria-labelledby="education-dropdown--mobile">
                    <a class="dropdown-item" href="/education">Education</a>
                    <a class="dropdown-item" href="https://github.com/dotnet-foundation/wg-education">Education Committee</a>
                    <a class="dropdown-item" href="/education/academy">.NET Foundation Academy</a>
                  </div>
                </li>
                <li class="nav-item dropdown main-menu_item">
                  <a class="nav-link dropdown-toggle-custom" id="news-dropdown news-dropdown--mobile" href="/news" role="button" aria-haspopup="true" aria-expanded="false">
                    News
                  </a>
                  <div class="dropdown-menu news-menu" aria-labelledby="news-dropdown">
                    <a class="dropdown-item" href="/blog">Blog</a>
                  </div>
                  <div class="mobile-items" aria-labelledby="news-dropdown--mobile">
                    <a class="dropdown-item" href="/news">News</a>
                    <a class="dropdown-item" href="/blog">Blog</a>
                  </div>
                </li>
                <li class="nav-item dropdown main-menu_item">
                  <a class="nav-link dropdown-toggle-custom" id="about-dropdown about-dropdown--mobile" href="/about" role="button" aria-haspopup="true" aria-expanded="false">
                    About
                  </a>
                  <div class="dropdown-menu about-menu" aria-labelledby="about-dropdown">
                    <a class="dropdown-item" href="/about/survey">Survey</a>
                    <a class="dropdown-item" href="/about/board-of-directors">Board of Directors</a>
                    <a class="dropdown-item" href="/about/budget">Budget</a>
                    <a class="dropdown-item" href="/about/technical-steering-group">Technical Steering Group</a>
                    <a class="dropdown-item" href="/about/code-of-conduct">Code of Conduct</a>
                    <a class="dropdown-item" href="/about/privacy-policy">Privacy Policy</a>
                    <a class="dropdown-item" href="/about/bylaws">Bylaws</a>
                    <a class="dropdown-item" href="/about/member-policy">Membership Policy</a>
                    <a class="dropdown-item" href="/about/election">Election</a>
                    <a class="dropdown-item" href="/about/faq">FAQ</a>
                  </div>
                  <div class="mobile-items" aria-labelledby="about-dropdown--mobile">
                    <a class="dropdown-item" href="/about">About</a>
                    <a class="dropdown-item" href="/about/survey">Survey</a>
                    <a class="dropdown-item" href="/about/board-of-directors">Board of Directors</a>
                    <a class="dropdown-item" href="/about/budget">Budget</a>
                    <a class="dropdown-item" href="/about/technical-steering-group">Technical Steering Group</a>
                    <a class="dropdown-item" href="/about/code-of-conduct">Code of Conduct</a>
                    <a class="dropdown-item" href="/about/privacy-policy">Privacy Policy</a>
                    <a class="dropdown-item" href="/about/bylaws">Bylaws</a>
                    <a class="dropdown-item" href="/about/member-policy">Membership Policy</a>
                    <a class="dropdown-item" href="/about/election">Election</a>
                    <a class="dropdown-item" href="/about/faq">FAQ</a>
                  </div>
                </li>
                <li class="nav-item dropdown main-menu_item">
                  <a class="nav-link dropdown-toggle-custom" id="socialize-dropdown socialize-dropdown--mobile" href="#" role="button" aria-haspopup="true" aria-expanded="false">
                    Socialize
                  </a>
                  <div class="dropdown-menu socialize-menu" aria-labelledby="socialize-dropdown">
                    <a class="dropdown-item" href="https://discord.gg/sv6vVzJBSR" target="_blank">Discord</a>
                    <a class="dropdown-item" href="https://twitter.com/dotnetfdn" target="_blank">Twitter</a>
                    <a class="dropdown-item" href="https://www.facebook.com/dotnetfoundation/" target="_blank">Facebook</a>
                    <a class="dropdown-item" href="https://www.linkedin.com/company/dotnetfoundation/" target="_blank">LinkedIn</a>
                    <a class="dropdown-item" href="https://www.youtube.com/channel/UCiaZbznpWV1o-KLxj8zqR6A" target="_blank">YouTube</a>
                    <a class="dropdown-item" href="https://eepurl.com/dhL_qb" target="_blank">Newsletter</a>
                  </div>
                  <div class="mobile-items" aria-labelledby="socialize-dropdown--mobile">
                    <a class="dropdown-item" href="#">Socialize</a>
                    <a class="dropdown-item" href="https://discord.gg/sv6vVzJBSR" target="_blank">Discord</a>
                    <a class="dropdown-item" href="https://twitter.com/dotnetfdn" target="_blank">Twitter</a>
                    <a class="dropdown-item" href="https://www.facebook.com/dotnetfoundation/" target="_blank">Facebook</a>
                    <a class="dropdown-item" href="https://www.linkedin.com/company/dotnetfoundation/" target="_blank">LinkedIn</a>
                    <a class="dropdown-item" href="https://www.youtube.com/channel/UCiaZbznpWV1o-KLxj8zqR6A" target="_blank">YouTube</a>
                    <a class="dropdown-item" href="https://eepurl.com/dhL_qb" target="_blank">Newsletter</a>
                  </div>
                </li>
              </ul>
            </div>
        </nav>
    </div>
</header>

<script>
    const $dropdown = $(".dropdown");
    const $dropdownToggle = $(".dropdown-toggle-custom");
    const $dropdownMenu = $(".dropdown-menu");
    const $mobileMenu = $(".mobile-items");
    const showClass = "show";

    $(window).on("load resize", function () {
        if (this.matchMedia("(min-width: 992px)").matches) {
            $dropdown.hover(
                function () {
                    const $this = $(this);
                    $this.addClass(showClass);
                    $this.find($dropdownToggle).attr("aria-expanded", "true");
                    $this.find($dropdownMenu).addClass(showClass);
                },
                function () {
                    const $this = $(this);
                    $this.removeClass(showClass);
                    $this.find($dropdownToggle).attr("aria-expanded", "false");
                    $this.find($dropdownMenu).removeClass(showClass);
                }
            );
        } else {
            $dropdown.off("mouseenter mouseleave");
            $dropdownToggle.click(function (e) {
                e.preventDefault();
                e.stopPropagation();
                const $this = $(this);
                const parent = $this.parent($dropdown);
                if (parent.find($mobileMenu).hasClass(showClass)) {
                    parent.find($mobileMenu).removeClass(showClass);
                } else {
                    parent.find($mobileMenu).addClass(showClass);
                }
            })
        }
    });
</script>
